// 管理员信息
const admin = {
  username: 'admin',
  password: 'admin',
  nickname: 'xwltz'
}

// 网站端口 [线上] || [测试]
const webSitePort = process.env.WEB_PORT || '6606'

// 邮件服务器
const email = {
  Host: 'smtp.126.com',
  Port: 25,
  Form: '61488281@qq.com',
  UserName: 'xwltz',
  Password: '',
  EnableSsl: false,
  EnablePwdAuthentication: false
}

// redis [线上]
const redisProd = {
  RDS_HOST: '172.17.0.1',
  RDS_PORT: 6379,
  RDS_OPTS: {
    db: 12
  }
}

// redis [测试]
const redisDeve = {
  RDS_HOST: '192.168.11.252',
  RDS_PORT: 6379,
  RDS_OPTS: {
    password: 'WsTx15963!',
    db: 12
  }
}

const redisPrefix = {
  cookie: 'game_list'
}

// redis
const redis = process.env.NODE_ENV === 'production' ? redisProd : redisDeve

// mysql
const mysqlProd = {
  hostname: 'sql.z150.vhostgo.com',
  username: 'yigesjcomcn',
  password: 'k2n2ymvy',
  database: 'yigesjcomcn'
}
const mysqlDeve = {
  hostname: 'sql.z150.vhostgo.com',
  username: 'yigesjcomcn',
  password: 'k2n2ymvy',
  database: 'yigesjcomcn'
}
const mysql = process.env.NODE_ENV === 'production' ? mysqlProd : mysqlDeve

// mysql
const mongoProd = 'mongodb://admin:NPmpyTR7PdTh4hiA@47.97.191.72:27017/xwltzdb?authSource=admin&serverTimezone=Asia/Shanghai'
const mongoDeve = 'mongodb://admin:NPmpyTR7PdTh4hiA@47.97.191.72:27017/xwltzdb?authSource=admin&serverTimezone=Asia/Shanghai'
const mongo = process.env.NODE_ENV === 'production' ? mongoProd : mongoDeve

module.exports = {
  admin,
  webSitePort,
  email,
  redisPrefix,
  redis,
  mysql,
  mongo
}
